# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import HttpResponse
from django.shortcuts import render
from .models import Article,Publication
# Create your views here.
def many(request):
    p1 = Publication(title="hello")
    p2 = Publication(title="hi")
    p3 = Publication(title="he")
    p1.save()
    p2.save()
    p3.save()


    a1 = Article(headline="这个世界本来就不公平，有很多shabi")
    a2 = Article(headline="作为以为程序员，我们应该养成良好的习惯")
    a3 = Article(headline="一个游戏厂商，要有良心，否则产品之后滞销")
    a1.save()
    a2.save()
    a3.save()
    a1.publications.add(p1)
    a2.publications.add(p1,p2)
    a2.publications.add(p3)
    return HttpResponse('succion')
